﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SDMX_ML.Framework.Common
{
    public enum EnumDataSetAction
    {
        Append,
        Replace,
        Delete,
        Information
    }

    internal class EnumerationConvert
    {

        internal static EnumDataSetAction EnumDataSetActionFromString(string enumValue)
        {
            EnumDataSetAction enumDataSetAction = EnumDataSetAction.Append;

            switch (enumValue.ToLower())
            {
                case "append":
                    enumDataSetAction = EnumDataSetAction.Append;
                    break;
                case "replace":
                    enumDataSetAction = EnumDataSetAction.Replace;
                    break;
                case "delete":
                    enumDataSetAction = EnumDataSetAction.Delete;
                    break;
                case "information":
                    enumDataSetAction = EnumDataSetAction.Information;
                    break;
            }


            return enumDataSetAction;
        }
    }
}
